import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

const app = createApp(App)
app.use(createPinia())
app.use(router)

app.mount('#app')


/* function buildTree(nodes: INode[]): INode[] {
  const nodeMap = new Map(nodes.map(node => [node.menuFolderId, node]));
  const tree: INode[] = [];

  nodes.forEach(node => {
    if (node.menuParentFolderId === null) {
      tree.push(node);
    } else {
      const parentNode = nodeMap.get(node.menuParentFolderId);
      if (parentNode) {
        if (!parentNode.children) {
          parentNode.children = [];
        }
        parentNode.children.push(node);
      }
    }
  });

  return tree;
} */